﻿<%@ page language="java" pageEncoding="UTF-8"
	errorPage="/ui/defaultException.jsp"%>
<%@include file="/ui/tags.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${hotel.name }的${resource.name }</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="${resource.zhname },${resource.enname},${hotel.zhname },${hotel.enname }" />
<meta name="description" content="${resource.summary }" />
<%@include file="/ui/portal/commonjscss.jsp"%>
<script src="${cpath}/resources/portal/js/scroll/scroll.js"
	type="text/javascript"></script>
</head>
<body>
	<div class="page">
		<c:set var="renderView" value="4" scope="page"></c:set>
		<%@include file="/ui/portal/head.jsp"%>
		<%@include file="/ui/portal/hotel/hotelhead.jsp"%>
		<div id="container" class="container margin10 width100">
			<div class="hotel-detail-info width100">
				<div class="hotel-detail-slider">
					<div id="room_selectors_gallery">
						<ul class="gallery_list">
							<c:if test="${empty resource && resourceType == 2}">该酒店暂时还没有房型！</c:if>
							<c:if test="${empty resource && resourceType == 3}">该酒店暂时还没有餐厅！</c:if>
							<c:if test="${empty resource && resourceType == 4}">该酒店暂时还没有特色！</c:if>
							<c:forEach var="item" items="${resource.images }">
								<li img-resize='true'><img alt="${resource.zhname }"
									src="${image_domain }${item.source }" />
								</li>
							</c:forEach>
						</ul>
						<a class="left leftenabled" href="">&nbsp;</a> <a
							class="right rightenabled" href="">&nbsp;</a>
						<div class="more_photos">
							<a class="head" href="#"><span class="icon">&nbsp;</span>
							</a>
							<div class="photos_slider">
								<ul>
									<c:forEach var="item" items="${resource.images }">
										<li img-resize='true'><img
											alt="${resource.zhname }"
											src="${image_domain }${item.source }" />
										</li>
									</c:forEach>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<div class="hotel-room">
					<div class="room-style">

						<div class="scrollbar  ">
							<a class="go_left disabled leftdisabled" href="javascript:;"></a>
							<div id="scroll" class="scroll carousel">
								<ul>
									<c:forEach var="resource" items="${navigateResource }"
										varStatus="status">
										<li scrollrel='${status.index+1 }'>
											<div class="hotelstyle">
												<div class="hotelstyleimg" href="javascript:;">
													<img
														src="${image_domain }${resource.source}${resource.small}"
														alt=" ${resource.zhname }">
												</div>
												<div class="hotelstyleinfo">${resource.zhname }
												</div>
											</div>
											<div class="hotel-i" data-key="${resource.resourceId }">
												<div class="hotel-i-img">
													<a
														href="${cpath }/hotel/${hotel.hotelId }/${resourceType }?rid=${resource.resourceId }"
														id="resourceID${status.index+1 }"
														rel='${resource.resourceId }' class="hotelclick"> <img
														src="${image_domain }${resource.source}${resource.small}"
														alt=" ${resource.zhname }" /> </a>
												</div>
												<div class="hotel-i-into">${resource.zhname }</div>
											</div></li>
									</c:forEach>
								</ul>
							</div>
							<a class="go_right" href="javascript:;"></a>
						</div>
					</div>
				</div>

				<div class="hotel-detail-note w800 margin0auto">
					<b id="resourceName">${resource.name }</b><br />

					<div id="resourceDesc">${resource.content }</div>
				</div>

				<!--
                <div class="hotel-detail-copy w800 margin0auto">
                    （图片版权：©WienTourismus / Peter Rigaud Legend: St. Stephen’s Cathedral: view from St.
                    Stephen’s Cathedral, the Fiakers）
                </div>
                  -->

				<div class="hotel-detail-share w800 margin0auto">
					<%@include file="/ui/portal/share.jsp"%>
					<script type="text/javascript">
						sinaShareData = {
							shareType : 6,
							openType : 1,
							dataId : '${resource.resourceId}'
						};
						tencentShareData = {
							shareType : 6,
							openType : 2,
							dataId : '${resource.resourceId}'
						};
						qzoneShareData = {
							shareType : 6,
							openType : 2,
							openTypeName : 'qzone',
							dataId : '${resource.resourceId}'
						};
					</script>
					
					<script src="${cpath}/resources/portal/js/swipe.js" type="text/javascript"></script>
					<script type="text/javascript">
						$(function(){
							var $curResource = $(".hotel-i[data-key='${resource.resourceId}']");
							var prePage = $curResource.parent("li").prev().find("a").attr("href");
							var nextPage = $curResource.parent("li").next().find("a").attr("href");
							$('.hotel-detail-slider').swipe({prePage:prePage,nextPage:nextPage});
						});
					</script>

					<script type="text/javascript">
						//$(".hotel-detail-slider").html("");
						//$(".hotel-detail-slider").html("<div class=\"loading\"></div>");
						var curDataKey = '${resource.resourceId}';
						//alert($(".hotel-i").length);
						
						//<div class="hotel-i" data-key="${resource.resourceId }">
						$("li[img-resize='true']").imgresize();
						jiathis_config['title'] = $('#resourceName').text();
						jiathis_config['summary'] = $('#resourceDesc').text();
						

						var dataIndex = 1;
						var countFlag = true;
						$(".hotel-i").each(function() {
							var dkey2 = $(this).attr("data-key");
							if (curDataKey == dkey2) {
								$(this).show();
								countFlag = false;
							} else {
								$(this).hide();
								//记录当前的索引
								if (countFlag) {
									dataIndex++;
								}
							}
						});

						$("#scroll li").hover(function() {
							$(this).find(".hotel-i").show();

						});
						$("#scroll li").mouseleave(function() {
							var obj = $(this).find(".hotel-i");
							if (obj.attr("data-key") != curDataKey) {
								obj.hide();
							}
						});
						//因为默认展示5张导航图
						$(function() {
							$(".carousel").jCarouselLite({
								visible : 5,
								btnNext : ".go_right",
								btnPrev : ".go_left",
								start : 0,
								circular : false,
								initIndex : dataIndex
							});
						});
					</script>
				</div>
			</div>
			<div class="clear"></div>
		</div>


		<%@include file="/ui/portal/footer.jsp"%>
	</div>
</body>
</html>
